﻿using SqlSugar;
using System;

/// <summary>
/// 门禁信息实体类
/// </summary>
[SugarTable("access_control")]
public class AccessControl
{
    /// <summary>
    /// 主键ID
    /// </summary>
    [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
    public int Id { get; set; }

    /// <summary>
    /// 门禁名
    /// </summary>
    [SugarColumn(ColumnName = "door_name", IsNullable = false)]
    public string DoorName { get; set; }

    /// <summary>
    /// 门禁英文名(客户端ID，字母数字)
    /// </summary>
    [SugarColumn(ColumnName = "door_name_en", IsNullable = false)]
    public string DoorNameEn { get; set; }

    /// <summary>
    /// 发布主题
    /// </summary>
    [SugarColumn(ColumnName = "StoC_topic", IsNullable = false)]
    public string StoC_topic { get; set; }

    /// <summary>
    /// 回复主题
    /// </summary>
    [SugarColumn(ColumnName = "CtoS_topic", IsNullable = false)]
    public string CtoS_topic { get; set; }

    /// <summary>
    /// 设备SN
    /// </summary>
    [SugarColumn(ColumnName = "device_sn", IsNullable = false)]
    public string DeviceSn { get; set; }

    /// <summary>
    /// 项目UUID
    /// </summary>
    [SugarColumn(ColumnName = "ProjectUUID", IsNullable = false)]
    public Guid ProjectUUID { get; set; }

    /// <summary>
    /// 楼栋UUID
    /// </summary>
    [SugarColumn(ColumnName = "BuildingUUID", IsNullable = false)]
    public string BuildingUUID { get; set; }

    /// <summary>
    /// 用户名
    /// </summary>
    [SugarColumn(ColumnName = "username", IsNullable = false)]
    public string Username { get; set; }

    /// <summary>
    /// 密码(建议加密存储)
    /// </summary>
    [SugarColumn(ColumnName = "password", IsNullable = false)]
    public string Password { get; set; }

    /// <summary>
    /// 图标URL
    /// </summary>
    [SugarColumn(ColumnName = "icon", IsNullable = true)]
    public string Icon { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [SugarColumn(ColumnName = "create_time", IsNullable = false, IsOnlyIgnoreInsert = true)]
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [SugarColumn(ColumnName = "update_time", IsNullable = false, IsOnlyIgnoreInsert = true)]
    public DateTime UpdateTime { get; set; }
}
